package com.erics.user_service.controller;

import com.erics.user_service.dto.req.UserRegisterReqDTO;
import com.erics.user_service.dto.resp.UserRegisterRespDTO;
import com.erics.user_service.service.UserInfoService;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import jakarta.validation.Valid;


@RestController
@RequiredArgsConstructor
public class UserInfoController {

    private final UserInfoService userInfoService;
    @PostMapping("/api/user-service/register")
    public Result<UserRegisterRespDTO> register(@RequestBody @Valid UserRegisterReqDTO requestParam) {
        return Results.success(userInfoService.register(requestParam));
    }
}
